<template>
  <div>
    <div>我是子组件， 我想从我父亲那边要点钱: {{ msg }}</div>
    <button @click="emits('giveMoney', 100)">要钱</button>
    <button @click="emits('sayHello', '老逼样')">打招呼</button>
  </div>
</template>

<script setup lang="ts">
const props = defineProps<{
  msg: string
}>()
const emits = defineEmits<{
  (e: 'giveMoney', money: number): void
  (e: 'sayHello', msg: string): void
}>()
</script>

<style></style>
